﻿Imports BUS
Imports DTO
Public Class frmDanhSachTraCuuSo
    Dim chkKhachHang As Boolean
    Dim chkSoDu As Boolean
    Dim chkLoaiTietKiem As Boolean
    Dim _maSo As String
    Dim _khackHang As String
    Dim _loaitietKiem As String
    Dim _soDuTu As Long
    Dim _soDuDen As Long
    Private _dtSTK As New DataTable()

    Public Property DSSTK() As DataTable
        Get
            Return _dtSTK
        End Get
        Set(ByVal value As DataTable)
            _dtSTK = value
        End Set
    End Property


    Private Sub frmDanhSachTraCuuSo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        chkKhachHang = frmChinh.UscTraCuuSoProperty.chkKhachHang.Checked
        chkSoDu = frmChinh.UscTraCuuSoProperty.chkSoDu.Checked
        chkLoaiTietKiem = frmChinh.UscTraCuuSoProperty.chkLoaiSo.Checked
        Dim i As Integer
        For i = 0 To _dtSTK.Rows.Count - 1
            Dim r As DataGridViewRow = New DataGridViewRow()
            r.CreateCells(dgvSoTietKiem)
            With r.Cells
                r.Cells(0).Value = (i + 1).ToString()
                r.Cells(1).Value = _dtSTK.Rows(i)("MaSo")
                r.Cells(2).Value = _dtSTK.Rows(i)("TenLoaiTietKiem")
                r.Cells(3).Value = _dtSTK.Rows(i)("TenKhachHang")
                r.Cells(4).Value = _dtSTK.Rows(i)("NgayMoSo")
                r.Cells(5).Value = _dtSTK.Rows(i)("SoDu")
                'STK.MaSo,LTK.TenLoaiTietKiem,KH.TenKhachHang,STK.NgayMoSo,STK.SoDu
            End With
            dgvSoTietKiem.Rows.Add(r)
            r = Nothing
        Next
    End Sub
End Class